/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (C) 2019 XiaoMi, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include "dsi-panel-jdi-fhd-r63452-cmd.dtsi"
#include "dsi-panel-sharp-fhd-td4322-cmd.dtsi"

&dsi_panel_pwr_supply {
	qcom,panel-supply-entry@0 {
		qcom,supply-post-on-sleep = <1>;
		qcom,supply-pre-off-sleep = <10>;
	};

	qcom,panel-supply-entry@1 {
		qcom,supply-pre-off-sleep = <10>;
	};
};

&soc {
	dsi_panel_pwr_supply_sharp_td4322: dsi_panel_pwr_supply_sharp_td4322 {
		#address-cells = <1>;
		#size-cells = <0>;

		qcom,panel-supply-entry@0 {
			reg = <0>;
			qcom,supply-name = "wqhd-vddio";
			qcom,supply-min-voltage = <1800000>;
			qcom,supply-max-voltage = <1950000>;
			qcom,supply-enable-load = <32000>;
			qcom,supply-disable-load = <80>;
			qcom,supply-post-on-sleep = <10>;
			qcom,supply-pre-off-sleep = <10>;
		};

		qcom,panel-supply-entry@1 {
			reg = <1>;
			qcom,supply-name = "lab";
			qcom,supply-min-voltage = <4600000>;
			qcom,supply-max-voltage = <6000000>;
			qcom,supply-enable-load = <100000>;
			qcom,supply-disable-load = <100>;
			qcom,supply-pre-off-sleep = <10>;
		};

		qcom,panel-supply-entry@2 {
			reg = <2>;
			qcom,supply-name = "ibb";
			qcom,supply-min-voltage = <4600000>;
			qcom,supply-max-voltage = <6000000>;
			qcom,supply-enable-load = <100000>;
			qcom,supply-disable-load = <100>;
			qcom,supply-post-on-sleep = <10>;
			qcom,supply-pre-off-sleep = <5>;
		};
	};
};

&dsi_jdi_fhd_r63452_cmd {
	qcom,mdss-dsi-panel-timings-phy-v2 = [24 1f 08 09 05 03 04 a0
		24 1f 08 09 05 03 04 a0
		24 1f 08 09 05 03 04 a0
		24 1f 08 09 05 03 04 a0
		24 1b 08 09 05 03 04 a0];
	qcom,mdss-dsi-t-clk-post = <0x07>;
	qcom,mdss-dsi-t-clk-pre = <0x28>;
};

&dsi_sharp_fhd_td4322_cmd {
	qcom,mdss-dsi-panel-timings-phy-v2 = [24 1f 08 09 05 03 04 a0
		24 1f 08 09 05 03 04 a0
		24 1f 08 09 05 03 04 a0
		24 1f 08 09 05 03 04 a0
		24 1b 08 09 05 03 04 a0];
	qcom,mdss-dsi-t-clk-post = <0x07>;
	qcom,mdss-dsi-t-clk-pre = <0x28>;
};

&dsi_jdi_fhd_r63452_cmd {
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
	qcom,mdss-dsi-bl-min-level = <1>;
	qcom,mdss-dsi-bl-max-level = <4095>;
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
};

&dsi_sharp_fhd_td4322_cmd {
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
	qcom,mdss-dsi-bl-min-level = <1>;
	qcom,mdss-dsi-bl-max-level = <4095>;
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply_sharp_td4322>;
};

